#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=1e6+1000;
typedef int LL;
inline LL read(){LL x=0,f=1;char ch=getchar();	while (!isdigit(ch)){if (ch=='-') f=-1;ch=getchar();}while (isdigit(ch)){x=x*10+ch-48;ch=getchar();}
return x*f;}
int main(void){
   LL t;scanf("%d",&t);
   while(t--){
      LL a,b,c;scanf("%d%d%d",&a,&b,&c);
      LL ans=0x3f3f3f3f;
      LL num1=0;LL num2=0;LL num3=0;
      for(LL i=1;i<=1e5/2;i++){
          for(LL j=i;j<=1e5/2;j+=i){
             LL temp1=abs(i-a)+abs(j-b);
             LL k1=c/j;LL k2=(c+j-1)/j;
             LL temp2=abs(k1*j-c);LL temp3=abs(k2*j-c);
             if(ans>temp1+temp2){
                ans=temp1+temp2;
                num1=i;num2=j;num3=k1*j;
             }
             if(ans>temp1+temp3){
                ans=temp1+temp3;
                num1=i;num2=j;num3=k2*j;
             }
          }
      }
      printf("%d\n",ans);
      printf("%d %d %d\n",num1,num2,num3);
   }
   return 0;
}
